﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ShopInTheEvent
{
    class ProductInfo
    {
        private string product_code;
        private string product_name;
        private double price;
        private int in_stock;


        //constructor///////////////////////
        public ProductInfo(string code, string product_name, double price, int stock) 
        {
            this.product_code = code;
            this.product_name = product_name;
            this.price = price;
            this.in_stock = stock;
        }
        //method
        //for the viewList/////////////////
        public string[] StringInfo() 
        {
            string[] row = { product_code, product_name, Convert.ToString(price), Convert.ToString(in_stock) };
            return row;
        }

        //proporties///////////////////////
        public string Fore_code
        {
            get { return product_code; }
            set { product_code = value; }
        }

        public string Product_name
        {
            get { return product_name; }
            set { product_name = value; }
        }

        public double Price
        {
            get { return price; }
            set { price = value; }
        }

        public int In_stock
        {
            get { return in_stock; }
            set { in_stock = value; }
        }
    }
}
